package edu.ensabap.matricula.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import edu.ensabap.matricula.bean.EdgarDTO;
import edu.ensabap.matricula.bean.JoaquinDTO;
import edu.ensabap.matricula.dao.EdgarDAO;
import edu.ensabap.matricula.dao.JoaquinDAO;


@Service
public class JoaquinService {

	
	@Autowired
	private JoaquinDAO joaquinDAO;
	
	
	//puente listar Edgar
	public List<JoaquinDTO> listarJoaquin(JoaquinDTO joaquin){		
		return joaquinDAO.listar(joaquin);
	}
	
	
//	puente insertar Edgar
	public int insertarJoaquin(JoaquinDTO joaquin){
		return joaquinDAO.insertar(joaquin);
	}
	
//	puente insertar Edgar
	public int eliminarJoaquin(JoaquinDTO joaquin){
		return joaquinDAO.eliminar(joaquin);
	}
	
//	obtenr por id
	public JoaquinDTO obtenerJoaquinXID(JoaquinDTO joaquin){
		return joaquinDAO.obtenerXID(joaquin).get(0);
	}
	
	public int modificarJoaquin(JoaquinDTO joaquin){
		return joaquinDAO.modificar(joaquin);
	}
	
}
